<?php
    // 判断是否有proId,section参数
    if(empty($_GET["proId"])){
        die("缺少proId参数！");
    }
    if(empty($_GET["section"])){
        die("缺少section参数！");
    }
    //  如果有参数，生一个 select * from content where section = 传入的section and proId = 传入的proId，查询语句
    $proId = $_GET["proId"];
    $section = $_GET["section"];
    $sql = "delete from content where proId= $proId and section=$section";
    include_once dirname(__FILE__) . '../../common/conn.php';
    $res = mysqli_query($con,$sql);
    mysqli_close($con);
    // 判断删除结果，并返回提示信息
    if($res){
        echo "<script> {window.alert('删除成功');location.href='cList.php'} </script>";
        exit;

    }
    else{
        echo "<script> {window.alert('删除失败，请返回重试');location.href='list.php'} </script>";
        exit;
    }